package alkaid.eis.sys.core;

import javax.persistence.PrePersist;

import alkaid.eis.common.util.SnowflakeHelper;

/**
 * 实体监听
 *  
 * @author Lucky Yang
 * @since 0.0.1
 */
public class BaseEntityListener {
    @PrePersist
	public void userPrePersist(AbstractBaseEntity e) {
        if (e.isNew()) {
            e.setId(SnowflakeHelper.INSTANCE.nextId());
        }
	}
}
